<?php
/**
 * Description
 *
 * PHP version 7
 *
 * @category Custom
 * @package  Custom
 * @author   ryu <mo5467@126.com>
 * @date     2020-04-29 01:21:26
 * @lastTime 2020-04-29 01:23:29
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     none
 */
namespace Design\Behavioral\Visitor;

class RecordingVisitor implements RoleVisitor
{

    private $visited = [];


    public function visitUser(User $user)
    {
        $this->visited[] = $user;

    }//end visitUser()


    public function visitGroup(Group $group)
    {
        $this->visited[] = $group;

    }//end visitGroup()


    public function getVisited() : array
    {
        return $this->visited;

    }//end getVisited()


}//end class
